#include<iostream>
#include<string>
using namespace std;

void test01()
{
	string str = "abcdefg";
	string strson = str.substr(1,3);
	cout << strson << endl;
}

void test02()
{
	string email = "xiehaiming@qq.com";

	int pos = email.find("@");
	string surName = email.substr(0, pos);
	cout << surName << endl;
}
int main()
{
	//test01();
	test02();
	system("pause");

	return 0;
}